package com.newdream.feigndemo.controller;

import com.newdream.feigndemo.model.User;
import com.newdream.feigndemo.service.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ author: sanglei
 * @ date: 2019-05-14 16:06
 * @ description: feignconsumer
 */
@RestController
public class FeignConsumer {
    @Autowired
    FeignService feignService;
    @GetMapping("getUser")
    public User getUser(@RequestParam("id") Integer id){
        return feignService.getUser(id);
    }

}
